package org.spring.blog.dao;

import org.spring.blog.pojo.LRImage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface LRImageDao extends JpaRepository<LRImage, String>, JpaSpecificationExecutor<LRImage> {
    @Modifying
    @Query(nativeQuery = true, value = "update sob_blog_system.tb_images set sob_blog_system.tb_images.state = ?2 where sob_blog_system.tb_images.id = ?1")
    int deleteByState(String _id, String _state);
}
